A fast border-detection algorithm named local border search algorithm was presented here, and applied to an on-line surface inspection system for cold rolled strips. Based on the last search result, a local search was used to position the cold rolled strip border and increased the algorithms speed greatly. Test with images collected from real world data shows that local border search algorithm is about 20 to 200 times faster than the traditional gray level gradient threshold algorithm, and can detect borders more accurately. The algorithm can also be used in the search of other image border.